home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / boot / netBoot.new / h / ctype.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-19  |  851 b   |  31 lines

  1.  
  2. /*    @(#)ctype.h 1.1 86/09/27 SMI; from UCB 4.1 83/05/03    */
  3. /* branched from SMI 1.2 83/08/07 */
  4.  
  5. #define    _U    01
  6. #define    _L    02
  7. #define    _N    04
  8. #define    _S    010
  9. #define _P    020
  10. #define _C    040
  11. #define _X    0100
  12. #define    _B    0200
  13.  
  14. extern    char    _ctype_[];
  15.  
  16. #define    isalpha(c)    ((_ctype_+1)[c]&(_U|_L))
  17. #define    isupper(c)    ((_ctype_+1)[c]&_U)
  18. #define    islower(c)    ((_ctype_+1)[c]&_L)
  19. #define    isdigit(c)    ((_ctype_+1)[c]&_N)
  20. #define    isxdigit(c)    ((_ctype_+1)[c]&(_N|_X))
  21. #define    isspace(c)    ((_ctype_+1)[c]&_S)
  22. #define ispunct(c)    ((_ctype_+1)[c]&_P)
  23. #define isalnum(c)    ((_ctype_+1)[c]&(_U|_L|_N))
  24. #define isprint(c)    ((_ctype_+1)[c]&(_P|_U|_L|_N|_B))
  25. #define    isgraph(c)    ((_ctype_+1)[c]&(_P|_U|_L|_N))
  26. #define iscntrl(c)    ((_ctype_+1)[c]&_C)
  27. #define isascii(c)    ((unsigned)(c)<=0177)
  28. #define toupper(c)    ((c)-'a'+'A')
  29. #define tolower(c)    ((c)-'A'+'a')
  30. #define toascii(c)    ((c)&0177)
  31.